﻿<!DOCTYPE html>
<%@page import="java.util.ArrayList"%>
<%@page import="mwa.cs.model.Reader"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../admin/authority.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<%@include file="headScriptRC.jsp"%>
<script type="text/javascript" src="../assets/js/rc/cs54002script.js"></script>
<script type="text/javascript">
var vaErrorMsg = '${vaErrorMsg}';
var vaStatusCancel = '${vaStatusCancelButton}';
</script>
</head>
<body>
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					

					<!-- <div id="displaymenu"></div>  -->
					<%@ include file="../admin/menu.jsp" %>

				</ul>
			</div>
		<!-- End SIDEMENU-->
		<div class="col-sm-12 col-xs-12" id="right-side">
			
			<div id="navigator-bar"><i class="fa fa-home"></i> หน้าหลัก <i class="fa fa-angle-right ml-5 mr-5"></i> ยกเลิกการปิดการรับเงินประจำวัน</div><!--End navigator-bar-->
			<div >
			<div id="page-header" class="clearfix">
				<div>ยกเลิกการปิดการรับเงินประจำวัน</div>
			</div>			
				<div class="form-detail clearfix">
						<h4><i class="fa fa-file-text-o"></i> จัดการรับเงิน</h4>
						<table  class="table-list mt-10" >	
							<tr>
								<th width="30%">ประเภทเงินได้</th>
								<th width="20%">จำนวน (บาท)</th>
								<th width="20%">ภาษี (บาท)</th>
								<th width="30%">จำนวนเงินรวม (บาท)</th>								
							</tr>
						<c:choose>
							<c:when test="${vaErrorMsg == 'no' }">
								<c:choose>
								<c:when test="${voStepOneReceiveCode21.vnBillAmount != 0.0 && voStepOneReceiveCode21.vnVatAmount != 0.0 }">
								<tr class="odd">
									<td style="text-align:left">ค่าน้ำ (ค่าน้ำ + ค่าบริการ)</td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnBillAmount}" pattern="###,##0.00"/></td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnVatAmount}" pattern="###,##0.00"/></td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnBillAmount + voStepOneReceiveCode21.vnVatAmount }" pattern="###,##0.00"/></td>		
								</tr>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${voStepOneReceiveCode21.vnGarbageCharge != 0.0 }">
								<tr class="even">
									<td style="text-align:left">ค่าขยะ</td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnGarbageCharge}" pattern="###,##0.00"/></td>
									<td style="text-align:right">0.00</td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnGarbageCharge}" pattern="###,##0.00"/></td>		
								</tr>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${voStepOneReceiveCode21.vnWasteWaterCharge != 0.0 }">
								<tr class="odd">
									<td style="text-align:left">ค่าบำบัดน้ำเสีย</td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnWasteWaterCharge}" pattern="###,##0.00"/></td>
									<td style="text-align:right">0.00</td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnWasteWaterCharge}" pattern="###,##0.00"/></td>		
								</tr>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${voStepOneReceiveCode21.vnOtherCharge != 0.0 }">
								<tr class="even">
									<td style="text-align:left">ค่าอื่นๆ</td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnOtherCharge}" pattern="###,##0.00"/></td>
									<td style="text-align:right">0.00</td>
									<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCode21.vnOtherCharge}" pattern="###,##0.00"/></td>		
								</tr>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${vnTotalPenalty != 0.0 }">
									<tr  class="odd">
										<td style="text-align:left" >ค่าปรับ</td>
										<td style="text-align:right" > <fmt:formatNumber value="${vnTotalPenalty }" pattern="###,##0.00"/></td>
										<td style="text-align:right">0.00</td>
										<td style="text-align:right" > <fmt:formatNumber value="${vnTotalPenalty }" pattern="###,##0.00"/></td>
									</tr>
								</c:when>
							</c:choose>
							<c:forEach var="voStepOneReceiveCodeNot21List" items="${voStepOneReceiveCodeNot21List}" varStatus="i">
								<c:choose>
									<c:when test="${i.count % 2 == 0 }">				
										<c:choose>
											<c:when test="${voStepOneReceiveCodeNot21List.vnGrossAmount - voStepOneReceiveCodeNot21List.vnVatAmount != 0.0 }">
											<tr class="even">
												<td style="text-align:left">${voStepOneReceiveCodeNot21List.vaReceiveDate}</td>
												<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCodeNot21List.vnGrossAmount - voStepOneReceiveCodeNot21List.vnVatAmount}" pattern="###,##0.00"/></td>
												<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCodeNot21List.vnVatAmount}" pattern="###,##0.00"/></td>
												<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCodeNot21List.vnGrossAmount}" pattern="###,##0.00"/></td>
											</tr>
											</c:when>
										</c:choose>	
									</c:when>
									<c:otherwise>
										<c:choose>
											<c:when test="${voStepOneReceiveCodeNot21List.vnGrossAmount - voStepOneReceiveCodeNot21List.vnVatAmount != 0.0 }">
												<tr class="odd">
													<td style="text-align:left">${voStepOneReceiveCodeNot21List.vaReceiveDate}</td>
													<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCodeNot21List.vnGrossAmount - voStepOneReceiveCodeNot21List.vnVatAmount}" pattern="###,##0.00"/></td>
													<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCodeNot21List.vnVatAmount}" pattern="###,##0.00"/></td>
													<td style="text-align:right"><fmt:formatNumber value="${voStepOneReceiveCodeNot21List.vnGrossAmount}" pattern="###,##0.00"/></td>	
												</tr>
											</c:when>
										</c:choose>	
									</c:otherwise>
								</c:choose>
							</c:forEach>
						<tr>
							<td style="text-align:right" colspan="3" >รวม</td>
							<td class="highlight-blue-2" style="text-align:right"> <fmt:formatNumber value="${vnSumRow21 + vnTotalPenalty }" pattern="###,##0.00"/></td>
						</tr>
						</c:when>
						<c:otherwise>
							<tr class="even"><td valign="top" colspan="4">ไม่พบรายการ สำหรับยกเลิกการปิดการรับเงินประจำวัน</td></tr>
						</c:otherwise>
					</c:choose>	
				</table>
				</div>
				<!-- End form-detail -->
				<c:choose>
					<c:when test="${vaErrorMsg == 'no' }">
						<div id="div_cancel_button" ></div>
					</c:when>
					<c:otherwise>
						<div class='form-detail' style='text-align:center; margin-top:-50px'><button type='button' class='btn btn-danger' disabled="disabled"  id='btn_cancel_button' name='btn_cancel_button'><i class='glyphicon glyphicon-floppy-remove'></i> ยกเลิก</button></div>
					</c:otherwise>
				</c:choose>	
				
				<!-- END form-1 -->
				<!-- message confirm  of cancel button -->
				<form class="form-inline" role="form" action="CS54002Srvl" method="POST">
				<input type="hidden" id="url_address" name="url_address" value="">
				<input type="hidden" id="agent_browser" name="agent_browser" value="">
					<div class="modal fade" id="myModalMessageConfirm">
					  <div class="modal-dialog" style="width:400px">
					    <div class="modal-content">
					       <div class="modal-header">
					        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					        <h4 class="modal-title">ยกเลิกการปิดการรับเงินประจำวัน</h4>
					      </div>
					      <div class="modal-body" >
					        <p><span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span> ยืนยันยกเลิกการปิดการรับเงินประจำวัน</p>
					      </div>
					      <div class="modal-footer">
							<input type="hidden"  class="btn btn-primary" name="btn_cancel" id="btn_cancel" value="no">
							<button type="submit" class="btn btn-primary" onclick="checkButtonClick('btn_cancel');"><i class="fa fa-floppy-o"></i> ยืนยัน</button>
							<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
					      </div>
					    </div><!-- /.modal-content -->
					  </div><!-- /.modal-dialog -->
					</div><!-- /.modal -->
				</form>
				
				
			</div>
			<!-- End detail-area -->
		
			<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2557 โดย การประปานครหลวง</div>
		</div>
	</div><!-- End Detail-area-->


</div>
<!-- End Wrapper -->
</body>
</html>